package com.google.android.gms.internal;

import java.io.IOException;

public final class zzkc extends zzflm<zzkc> {
    private Integer zzbew = null;
    private Integer zzbgg = null;
    private Integer zzbgh = null;
    private zzjy zzbgo = null;
    private Integer zzbgs = null;

    public zzkc() {
        this.zzpvl = null;
        this.zzpnr = -1;
    }

    /* access modifiers changed from: private */
    /* renamed from: zzz */
    public final zzkc zza(zzflj zzflj) throws IOException {
        while (true) {
            int zzcxx = zzflj.zzcxx();
            if (zzcxx == 0) {
                return this;
            }
            if (zzcxx == 8) {
                int position = zzflj.getPosition();
                try {
                    this.zzbew = Integer.valueOf(zzjc.zzd(zzflj.zzcym()));
                } catch (IllegalArgumentException unused) {
                    zzflj.zzmw(position);
                    zza(zzflj, zzcxx);
                }
            } else if (zzcxx == 18) {
                if (this.zzbgo == null) {
                    this.zzbgo = new zzjy();
                }
                zzflj.zza(this.zzbgo);
            } else if (zzcxx == 24) {
                this.zzbgg = Integer.valueOf(zzflj.zzcym());
            } else if (zzcxx == 32) {
                this.zzbgh = Integer.valueOf(zzflj.zzcym());
            } else if (zzcxx == 40) {
                this.zzbgs = Integer.valueOf(zzflj.zzcym());
            } else if (!super.zza(zzflj, zzcxx)) {
                return this;
            }
        }
    }

    public final void zza(zzflk zzflk) throws IOException {
        if (this.zzbew != null) {
            zzflk.zzad(1, this.zzbew.intValue());
        }
        if (this.zzbgo != null) {
            zzflk.zza(2, (zzfls) this.zzbgo);
        }
        if (this.zzbgg != null) {
            zzflk.zzad(3, this.zzbgg.intValue());
        }
        if (this.zzbgh != null) {
            zzflk.zzad(4, this.zzbgh.intValue());
        }
        if (this.zzbgs != null) {
            zzflk.zzad(5, this.zzbgs.intValue());
        }
        super.zza(zzflk);
    }

    /* access modifiers changed from: protected */
    public final int zzq() {
        int zzq = super.zzq();
        if (this.zzbew != null) {
            zzq += zzflk.zzag(1, this.zzbew.intValue());
        }
        if (this.zzbgo != null) {
            zzq += zzflk.zzb(2, (zzfls) this.zzbgo);
        }
        if (this.zzbgg != null) {
            zzq += zzflk.zzag(3, this.zzbgg.intValue());
        }
        if (this.zzbgh != null) {
            zzq += zzflk.zzag(4, this.zzbgh.intValue());
        }
        return this.zzbgs != null ? zzq + zzflk.zzag(5, this.zzbgs.intValue()) : zzq;
    }
}
